
package gov.chinatax.ctcps.generator.form;

import java.text.ParseException;
import java.text.SimpleDateFormat;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

/**
 * Form for ykjhMxgl.
 *
 * @author <a href="http://boss.bekk.no/boss/middlegen/"/>Middlegen</a>
 *
 * @struts.form name="ykjhMxglForm"
 */
public class YkjhMxglForm extends ActionForm {

   private final static SimpleDateFormat FORMAT = new SimpleDateFormat("dd.MM.yyyy hh:mm:ss");

   private java.lang.String _jhglbh = null;
   private java.lang.String _jhzybhHz = null;
   private java.lang.String _jhzybhMx = null;
   private java.lang.String _zt1 = null;
   private java.lang.String _zt12 = null;

   /**
    * Standard constructor.
    */
   public YkjhMxglForm() {
   }

   /**
    * Returns the jhglbh
    *
    * @return the jhglbh
    */
   public java.lang.String getJhglbh() {
      return _jhglbh;
   }

   /**
    * Sets the jhglbh
    *
    * @param jhglbh the new jhglbh value
    */
   public void setJhglbh(java.lang.String jhglbh) {
      _jhglbh = jhglbh;
   }
   /**
    * Returns the jhzybhHz
    *
    * @return the jhzybhHz
    */
   public java.lang.String getJhzybhHz() {
      return _jhzybhHz;
   }

   /**
    * Sets the jhzybhHz
    *
    * @param jhzybhHz the new jhzybhHz value
    */
   public void setJhzybhHz(java.lang.String jhzybhHz) {
      _jhzybhHz = jhzybhHz;
   }
   /**
    * Returns the jhzybhMx
    *
    * @return the jhzybhMx
    */
   public java.lang.String getJhzybhMx() {
      return _jhzybhMx;
   }

   /**
    * Sets the jhzybhMx
    *
    * @param jhzybhMx the new jhzybhMx value
    */
   public void setJhzybhMx(java.lang.String jhzybhMx) {
      _jhzybhMx = jhzybhMx;
   }
   /**
    * Returns the zt1
    *
    * @return the zt1
    */
   public java.lang.String getZt1() {
      return _zt1;
   }

   /**
    * Sets the zt1
    *
    * @param zt1 the new zt1 value
    */
   public void setZt1(java.lang.String zt1) {
      _zt1 = zt1;
   }
   /**
    * Returns the zt12
    *
    * @return the zt12
    */
   public java.lang.String getZt12() {
      return _zt12;
   }

   /**
    * Sets the zt12
    *
    * @param zt12 the new zt12 value
    */
   public void setZt12(java.lang.String zt12) {
      _zt12 = zt12;
   }


   /**
    * Validate the properties that have been set from this HTTP request,
    * and return an <code>ActionErrors</code> object that encapsulates any
    * validation errors that have been found.  If no errors are found, return
    * <code>null</code> or an <code>ActionErrors</code> object with no
    * recorded error messages.
    *
    * @param mapping The mapping used to select this instance
    * @param request The servlet request we are processing
    */
   public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
      ActionErrors errors = new ActionErrors();
      // test for nullity
      if(getJhglbh() == null) {
         errors.add("jhglbh", new ActionError("error.jhglbh.required"));
      }
      if(getJhzybhHz() == null) {
         errors.add("jhzybhHz", new ActionError("error.jhzybhHz.required"));
      }
      if(getJhzybhMx() == null) {
         errors.add("jhzybhMx", new ActionError("error.jhzybhMx.required"));
      }
      // TODO test format/data
      return errors;
   }
}
